
import { DecisionRoomActive } from "../Control/Decision/DecisionRoomActive";
import { DecisionLabBoostActive } from "../Control/Decision/module/labs/boost/DecisionBoostActive";
import { DecisionReactionActive } from "../Control/Decision/module/labs/reaction/DecisionReactionActive";
import { DecisionActive } from "../Control/Decision/normal/DecisionActive";
import { BaseState } from "../Control/State/room/base/BaseState";
import { InnerMineActiveState } from "../Control/State/room/mine/InnerMineActiveState";
import { SpawnState } from "../Control/State/room/spawn/SpawnState";
import { TaskExecuteState } from "../Control/State/room/task/TaskExecuteState";
import { RoomVisualState } from "../Control/State/room/visual/RoomVisualState";
import { TeamUpgradeState } from "../Control/State/team/TeamUpgradeState";
import { AICreepFactory } from "./FSMCreep/AICreepFactory";
import { HFSMFactoryHelper } from "./HFSMFactoryHelper";
import { Reaction_State } from "../Control/State/room/labs/ReactionState";
import { Boost_State } from "../Control/State/room/labs/BoostState";
import { TerminalTask } from "../Control/State/room/core/terminal/TerminalTask";
import { DecisionTerminalActive } from "../Control/Decision/module/terminal/DecisionTerminalActive";
import { DecisionFactoryActive } from "../Control/Decision/module/factory/DecisionFactoryActive";
import { AIProduceFactory } from "./FSMFactory/AIProduceFactory";
import { FSMPowerCreep } from "./FSMPowerCreep/FSMPowerCreep";
import { DecisionIsActivePC } from "../Control/Decision/powerCreep/DecisionIsActivePC";

export class AIControllFactory
{
    // 创建房间控制器
    static CreateRoomController()
    {
        return HFSMFactoryHelper.CreateHFSMModuleBy(DecisionRoomActive,new BaseState()).addComponents(
            [
                this.CreateRoomTaskController(),
                this.CreateRoomVisualController(),
                this.CreateLabReactionController(),
                this.CreateLabBoostController(),
                this.CreateTerminalController(),
                this.CreateFactoryController()
            ])
    }

    /**
     * 创建房间任务控制器
     * */ 
    static CreateRoomTaskController()
    {
        return HFSMFactoryHelper.CreateHFSMModuleBy(DecisionRoomActive,new TaskExecuteState()) 
    }
    /**
 * 创建房间任务控制器
 * */ 
    static CreateRoomVisualController()
    {
        return HFSMFactoryHelper.CreateHFSMModuleBy(DecisionRoomActive,new RoomVisualState()) 
    }
    /**
     * 化合物反应任务
     * @returns 
     */
    static CreateLabReactionController()
    {
        return HFSMFactoryHelper.CreateHFSMModuleBy(DecisionReactionActive,new Reaction_State()) 
    }
    /**
         * 终端任务任务
         * @returns 
         */
    static CreateTerminalController()
    {
        return HFSMFactoryHelper.CreateHFSMModuleBy(DecisionTerminalActive,new TerminalTask()) 
    }
    /**
     * 终端任务任务
     * @returns 
     */
    static CreateFactoryController()
    {
        return HFSMFactoryHelper.CreateHFSMModuleBy(DecisionFactoryActive, AIProduceFactory.CreateFactory()) 
    }
    
     /**
     * 强化任务
     * @returns 
     */
    static CreateLabBoostController()
    {
        return HFSMFactoryHelper.CreateHFSMModuleBy(DecisionLabBoostActive,new Boost_State()) 
    }
    
    static CreateRoomBaseController()
    {

    }
 
    /**
     * 创建爬虫控制器
     */
    static CreateCreepController()
    {
        return AICreepFactory.CreateCreep();
    }

      /**
     * 创建PC控制器
     */
    static CreatePowerCreepController()
    {
        return HFSMFactoryHelper.CreateHFSMModuleBy(DecisionIsActivePC,FSMPowerCreep.Create()); 
    }
    
    /**
     * 创建能量矿控制器
     * @returns 
     */
    static CreateInnerMineController()
    {
        return HFSMFactoryHelper.CreateHFSMModuleBy(DecisionActive,new InnerMineActiveState());
    }

     /**
     * 创建孵化控制器
     * @returns 
     */
      static CreateSpawnController()
      {
          return HFSMFactoryHelper.CreateHFSMModuleBy(DecisionActive,new SpawnState());
      }


      static CreateTeamUpgrade()
      {
          return HFSMFactoryHelper.CreateHFSMModuleBy(DecisionActive,new TeamUpgradeState());
      }
}